/*eslint-disable */
import documentItemMgtTpl from './documentItemMgt.html';
import commonDocumentTpl from '../documentItemMgt.commonDocument/commonDocument.html';
import personnelClassifyTpl from '../personnelClassify/personnelClassify.html';
import deviceClassifyTpl from '../deviceClassify/deviceClassify.html';
import safeActivitiesTpl from '../safeActivities/safeActivities.html';
import documentItemMgtCtrl from './documentItemMgt.controller';
import documentCommonCtrl from '../documentItemMgt.commonDocument/commonDocument.controller';
import personnelClassifyCtrl from '../personnelClassify/personnelClassify.controller';
import deviceClassifyCtrl from '../deviceClassify/deviceClassify.controller';
import safeActivitiesCtrl from '../safeActivities/safeActivities.controller';

function routeConfig($stateProvider) {
  'ngInject';

  $stateProvider
    .state('documentItemMgt', {
      parent: 'index',
      url: '/documentItemMgt/:boxId/:name/:documentType',
      templateUrl: documentItemMgtTpl,
      controller: documentItemMgtCtrl,
      controllerAs: 'documentItemMgt',
    })
    // 通用档案查询方法
    .state('documentItemMgt.commonDocument', {
      parent: 'documentItemMgt',
      url: '/commonDocument?boxId?name?type?orgId',
      templateUrl: commonDocumentTpl,
      controller: documentCommonCtrl,
      controllerAs: 'vm',
    })
    // 人员分类页面
    .state('documentItemMgt.personnelClassify', {
      parent: 'documentItemMgt',
      url: '/worker/classify?orgId',
      templateUrl: personnelClassifyTpl,
      controller: personnelClassifyCtrl,
      controllerAs: 'vm',
    })
    // 设备分类页面
    .state('documentItemMgt.deviceClassify', {
      parent: 'documentItemMgt',
      url: '/device/classify',
      templateUrl: deviceClassifyTpl,
      controller: deviceClassifyCtrl,
      controllerAs: 'vm',
    })
    // 安全会议页面
    .state('documentItemMgt.meetings', {
      parent: 'documentItemMgt',
      url: '/safeActivity/meetings',
      templateUrl: safeActivitiesTpl,
      controller: safeActivitiesCtrl,
      controllerAs: 'vm',
    })
    // 安全教育培训页面
    .state('documentItemMgt.trainings', {
      parent: 'documentItemMgt',
      url: '/safeActivity/trainings',
      templateUrl: safeActivitiesTpl,
      controller: safeActivitiesCtrl,
      controllerAs: 'vm',
    })
    // 安全技术交底页面
    .state('documentItemMgt.disclosures', {
      parent: 'documentItemMgt',
      url: '/safeActivity/disclosures',
      templateUrl: safeActivitiesTpl,
      controller: safeActivitiesCtrl,
      controllerAs: 'vm',
    });
}

export default routeConfig;
